
export default {
    //转时间格式 
    msToDate(msec) {
        let res = this.date(msec)
        let datetime = new Date(res);
        let year = datetime.getFullYear();
        let month = datetime.getMonth();
        let date = datetime.getDate();
        let hour = datetime.getHours();
        let minute = datetime.getMinutes();
        let second = datetime.getSeconds();
        let result1 = year +
            '-' +
            ((month + 1) >= 10 ? (month + 1) : '0' + (month + 1)) +
            '-' +
            ((date + 1) < 10 ? '0' + date : date) +
            ' '


        let result2 = year +
            '-' +
            ((month + 1) >= 10 ? (month + 1) : '0' + (month + 1)) +
            '-' +
            ((date + 1) < 10 ? '0' + date : date);
        let result = {
            cdepositTimeBegin: result1,
            cdepositTimEnd: result2
        };

        return result1;

    },
    date(date) {
        let result = new Date(date).getTime();
        return result;
    }
}